<?php require_once('PhpSerial.php');
$PhpSerial=new PhpSerial;$PhpSerial->deviceSet('COM3');
if($PhpSerial->deviceOpen()){

}
else echo 'khong mo duc';
$PhpSerial->deviceClose();
?>